Skip to main content

Select Item

AutomatR.Web.SelectItem

The "Select Item" activity in AutomatR is designed for UI automation workflows, specifically for selecting an item from a combo box or list box within a web application. This activity enables efficient interaction with dropdowns and lists, enhancing the capabilities of web automation.

NOTE: This activity must be added inside the Application/Browser activity.

NOTE: Using this activity on a combo box or list box that has not been interacted with before you run the workflow can cause the activity to throw an error. The best practice to avoid this issue is to add a Click activity configured to click the target drop-down menu before the Select Item activity is executed.

Properties

NameDescription
Input
ElementSelect the web element by using the provided selector window. This indicates the UI element on the web page. Use either the "Element" or "WebElement" property.
WebElementEnter the UI element variable identified by the "Find Element" or other activities. Use either the "Element" or "WebElement" property.
Item NameEnter the string text for the item to be selected from the dropdown or list box. Provide either the "Item Name" or "Item Value" property; not both.
Item ValueEnter the string text for the item value, which can be captured from the CSS/DOM of the dropdown or list box. Provide either the "Item Name" or "Item Value" property; not both.
Misc
Display NameProvides a customizable name for the activity displayed in the workflow. String variables containing the desired display name.
Optional
TimeoutEnter the time, in seconds (e.g., 5), for the activity to be executed before throwing an exception. This is the maximum time the activity will wait for the selection to occur. If not provided, a default timeout will be used.
CompareEnter a boolean value to determine if the item selection should be based on partial text comparison.
RegexpEnter a regular expression to refine the selection based on specific patterns or criteria.
DelayEnter the wait time in seconds before starting the activity. This can be useful for handling synchronization issues or waiting for specific conditions before selecting an item.
Output
ResultReturns True or False based on the success of the item selection. Use this output to verify if the item was successfully selected.

How to use:

  1. Drag and drop the "Select Item" activity onto the workflow.
  2. Configure the properties by selecting the web element or providing the UI element variable.
  3. Specify either the "Item Name" or "Item Value" for the item you want to select from the dropdown or list box.
  4. Optionally, configure the timeout, text comparison, regular expression, and delay.
  5. Execute the workflow to interact with the specified dropdown or list box and select the desired item.

Example: Consider an example where the "Select Item" activity is used to choose a country from a dropdown:

Select Item:
Element: (Use the selector window to choose the dropdown element)
Item Name: "United States"
Timeout: 10 (seconds)
Result: isItemSelected

In this example, the activity selects the item with the name "United States" from the specified dropdown element. The timeout is set to 10 seconds, and the result is stored in the Boolean variable "isItemSelected" for further workflow logic.